home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 6_functions / writeb < prev   
Text File  |  2001-03-21  |  1KB  |  29 lines

  1. Synopsis:
  2.    $write(<fd> <text>)
  3.    $writeb(<fd> <text>)
  4.  
  5. Technical:
  6.    This function writes the given text to the given file descriptor.  A
  7.    newline is automatically appended to the text.  The $writeb() variant
  8.    does the same thing, except the newline is not automatically appended.
  9.  
  10. Practical:
  11.    This function is useful for saving information to an external file.  It
  12.    is most often used in scripts for saving configuration settings and the
  13.    like.  The $writeb() function is useful for writing to binary files, or
  14.    for writing lines to a file incrementally.
  15.  
  16. Returns:
  17.      -1   if file descriptor does not exist
  18.    > -1   number of bytes written (text length plus newline, if applicable)
  19.  
  20. Examples:
  21.    $write(7 blah blah)                 writes "blah blah" plus NL to fd "7"
  22.    $write(foo bar)                     "foo" not an fd, writes nothing
  23.    $writeb(7 blah blah)                writes "blah blah" to fd "7"
  24.    $writeb(foo bar)                    "foo" not an fd, writes nothing
  25.  
  26. See Also:
  27.    close(6); open(6); read(6)
  28.  
  29.